make fls() and ffs() consistent across architectures
authorJan Beulich <jbeulich@suse.com>
Fri, 23 Jan 2015 13:59:37 +0000 (14:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Jan 2015 13:59:37 +0000 (14:59 +0100)
commitefb0d962cd3a10f1595fc49c95574874f0a02ea0
treeab807bb1f2e085632011027d7cec9de184587829
parentdf39f487cc646774af130b856066c3c6538a0dc9
make fls() and ffs() consistent across architectures

Their parameter types differed between ARM and x86.

Along with generalizing the functions this fixes
- x86's non-long functions having long parameter types
- ARM's ffs() using a long intermediate variable
- generic_fls64() being broken when the upper half of the input is
  non-zero
- common (and in one case also ARM) code using fls() when flsl() was
  meant

Also drop ARM's constant_fls() in favor of the identical generic_fls().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/common/page_alloc.c
xen/common/xmalloc_tlsf.c
xen/include/asm-arm/arm32/bitops.h
xen/include/asm-arm/arm64/bitops.h
xen/include/asm-arm/bitops.h
xen/include/asm-x86/bitops.h
xen/include/xen/bitops.h